<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>登录页面</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<script type="text/javascript" src="js/lib/easyui/jquery.min.js"></script>
	<link rel="stylesheet" type="text/css" href="js/lib/login/normalize.css"/>
	<link rel="stylesheet" type="text/css" href="js/lib/login/demo.css"  />
	<!--必要样式-->
	<link rel="stylesheet" type="text/css" href="js/lib/login/component.css"/>
	<!--[if IE]>
	<script src="js/lib/login、html5.js"></script>
	<![endif]-->
	<script type="text/javascript">
	    document.onkeydown = function (event) {
	        var e = event || window.event;
	        if (e && e.keyCode == 13) { //回车键的键值为13
	            dologin(); //调用登录方法
	        }
	    };
		function dologin() {
			var username, password;
			username = $("#username").val();
			password = $("#password").val();
			$.post("dologin",
					{username:username,password:password},
					function(data,status){
						if(data._success==false){
							alert(data._message);
						}else{
							window.location.href = "main";
						}
					}
			);
		}
		function cancel(){
			$("#username").val("");
			$("#password").val("");
		}
	</script>
  </head>
  <body>
	<div class="container">
		<div class="content">
			<div id="large-header" class="large-header">
				<canvas id="demo-canvas"></canvas>
				<div class="logo_box">
					<h1 style="text-align: center;">框架系统</h1>
						<div class="input_outer">
							<span class="u_user"></span> 
							<input name="logname" autocomplete="off" class="text" id="username" name="username" value="${username}" style="color: #FFFFFF !important" type="text" placeholder="请输入账户">
						</div>
						<div class="input_outer">
							<span class="us_uer"></span> 
							<input name="logpass" autocomplete="new-password" class="text" id="password" name="password" style="color: #FFFFFF !important; position:absolute; z-index:100;"  type="password" placeholder="请输入密码">
						</div>
						<div class="mb2">
							<a class="act-but submit" href="javascript:dologin();"
								style="color: #FFFFFF">登录</a>
							<a class="act-but submit" href="javascript:cancel();"
								style="color: #FFFFFF">取消</a>
						</div>
				</div>
			</div>
		</div>
	</div>
	<script src="js/lib/login/TweenLite.min.js"></script>
	<script src="js/lib/login/EasePack.min.js"></script>
	<script src="js/lib/login/rAF.js"></script>
	<script src="js/lib/login/demo-1.js"></script>
</body>
</html>
